<!-- doi tu view-box search xuong day -->
<script type="text/javascript">

function autoload_kg_quanhuyen()
{
	var citys = $("#kg_citys").val();
	var cityshidden = '#' + citys;	
	var myhidden_quanhuyen = $(cityshidden).val();	
	var myhidden_quanhuyen_title = $(cityshidden).attr("title");		
	$("#kg_district option").remove();

	if(myhidden_quanhuyen!='')
	{	
		var myhidden_quanhuyen_2 = myhidden_quanhuyen.split(",");
		var myhidden_quanhuyen_2_title = myhidden_quanhuyen_title.split(",");
		$("#kg_district").append('<option value=""></option>');		
		for(i=0;i< myhidden_quanhuyen_2.length ;i++)
		{	
			$("#kg_district").append('<option value="'+ myhidden_quanhuyen_2[i] +'">'+ myhidden_quanhuyen_2_title[i] +'</option>');
		}
	}
}

function autoload_box_search_quanhuyen()
{
	var citys = $("#citys").val();
	var cityshidden = '#' + citys;
	
	var myhidden_quanhuyen = $(cityshidden).val();	
	var myhidden_quanhuyen_title = $(cityshidden).attr("title");	

	$("#districts option").remove();

	if(myhidden_quanhuyen!='')
	{	
		var myhidden_quanhuyen_2 = myhidden_quanhuyen.split(",");
		var myhidden_quanhuyen_2_title = myhidden_quanhuyen_title.split(",");

		$("#districts").append('<option value=""></option>');
		for(i=0;i< myhidden_quanhuyen_2.length ;i++)
		{		
			$("#districts").append('<option value="'+ myhidden_quanhuyen_2[i] +'">'+ myhidden_quanhuyen_2_title[i] +'</option>');
		}
	}
}

//autoload_box_search_quanhuyen();
//autoload_kg_quanhuyen();

$(document).ready(function(){
	// xu kien onchange
	// xu ly thanh pho
	$("#kg_citys").change(function(){		
		//chuoi du lieu			
		autoload_kg_quanhuyen();
	});
	
	
	
	// xu ly thanh pho
	$("#citys").change(function(){		
		//chuoi du lieu			
		autoload_box_search_quanhuyen();
	});

	//autoload_box_search_quanhuyen();
	//autoload_kg_quanhuyen();

	// xu ly click btn search
	$("#btn_search_send_request").click(function(){
		
		var keyword = $("#s").val();
		var citys  = $("#citys").val();
		var districts = $("#districts").val();
		var prices = $("#prices").val();
		var styles = $("#styles").val();
		
		if(keyword=="Nhập từ khóa tìm kiếm..." && citys=="chon-tinh-thanh-pho" && districts=="chon-quan-huyen" && prices=="chon-khoang-gia" && styles=="chon-loai-dia-oc")
		{
			alert("Hãy nhập từ khóa tìm kiếm, hoặc chọn các mục tìm kiếm bên dưới.");
			return false;
		}
		else
			return true;
				
	});
});

</script>

<script type="text/javascript" src="<?php echo WP_MYSITE_TEMPLATE_URL;?>/js/login.js"></script>

<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

<!-- 
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


-->


<?php 
global $wpdb,$paged,$mn_home,$current_page,$mn_chothue,$mn_canban,$mn_kygui,$mn_gioithieu,$mn_lienhe,$mn_quydinhsudung;

?>

<div class="footer">
    <div class="content_footer">
      <div class="menu_footer">
        <ul>
        	<li <?php echo $mn_home;?>><a href="<?php echo WP_MYSITE_URL;?>">Trang chủ</a></li>
          <li <?php echo $mn_gioithieu;?>><a href="<?php echo WP_MYSITE_URL;?>/gioi-thieu">Giới thiệu</a></li>
          <li><a href="#" class="dk-nt">Đăng ký nhận tin</a></li>
          <li <?php echo $mn_lienhe;?>><a href="<?php echo WP_MYSITE_URL;?>/lien-he">Liên hệ</a></li>
          <li <?php echo $mn_quydinhsudung;?> ><a href="<?php echo WP_MYSITE_URL;?>/quy-dinh-su-dung">Quy định sử dụng</a></li>
        </ul>
      </div>
      <!-- end .menu_footer-->
      <div class="copy_right">Bản quyền 2012 thuộc về <?php echo get_option("mySetting_company_name");?></div>
      <!-- end .copy_right-->
    </div>
    <!-- end .content_footer-->
  </div>
  <!-- end .footer-->
</div>
<!-- end .swapper_content-->
</div>
<!-- end #content-->
<!-- end .swapper-->
<?php
$google_analytic = get_option("google_analytics"); 
//UA-33307523-2
?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '<?php echo $google_analytic;?>']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<?php require_once TEMPLATEPATH.'/views/account/view-user-hidden.php';?>

</body>
</html>